﻿using System.Net;

namespace Toybox.NicoSharp.Live
{
	using Extensions;
	using Utilities;

	public static class LiveUtility
	{
		public static bool Leave(string completeId, CookieCollection cookies)
		{
			string html = NicoWebClient.Get(NicoUrls.WatchLiveApi + @"leave?v=" + completeId, cookies.Coerce());
			bool result;

			return bool.TryParse(html, out result) ? result : false;
		}
	}
}
